# This is an example Hyprland config file.
# Syntax is the same as in Hypr, but settings might differ.
#
# Refer to the wiki for more information.

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki (basic and advanced configuring)
#

exec-once=systemctl --user start hyprland-session.target
exec-once=systemctl --user start hyprland-session.target
#monitor=,1920x1080@60.030998,0,0
#workspace=eDP-1,0


input {
    kb_layout=us
    #kb_variant=AT Translated Set 2 keyboard
    kb_model=
    kb_options=
    kb_rules=
    repeat_rate=30
    repeat_delay=500

    follow_mouse=1
    force_no_accel=0

    touchpad {
        natural_scroll=0
        middle_button_emulation=1
        tap-to-click=1
        clickfinger_behavior=1
        disable_while_typing=1

    }
}

general {
    sensitivity=0.7 # for mouse cursor
    apply_sens_to_raw=0
    main_mod=SUPER

    gaps_in=5
    gaps_out=10
    border_size=2
    col.active_border=0xFFFF00FF
    col.inactive_border=0x44FF7F00
    cursor_inactive_timeout=1
    # More colors
    # 0x66333333 0xFD333333 0xFD111111 0xFFFF00FF 0xFF222222 0x44FF7F00 0xFFFF00FF 0xFD333333

    apply_sens_to_raw=1 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)

    damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
}

decoration {
    rounding=10
    active_opacity=1.0
    inactive_opacity=0.9
    fullscreen_opacity=1.0
    blur=0
    blur_size=3 # minimum 1
    blur_passes=1 # minimum 1, more passes = more resource intensive.
    blur_ignore_opacity=0
    # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts.
    # if you want heavy blur, you need to up the blur_passes.
    # the more passes, the more you can up the blur_size without noticing artifacts.
}

# set wallpaper
exec-once=~/.local/bin/waywall wall
exec-once=export XDG_SESSION_TYPE=wayland
exec-once=/run/current-system/sw/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP

# start waybar # temporary fix. would make it work with systemd
# exec-once=waybar &

animations {
    enabled=1
    animation=windows,1,10,default,popin 80%
    #animation=borders,1,10,default
    #animation=fadein,1,10,default
    #animation=workspaces,1,10,slide
}

dwindle {
    pseudotile=0 # enable pseudotiling on dwindle
    col.group_border=0x66333333
    #color.group_border_active=0xFD111111
    force_split=2
    preserve_split=1
    special_scale_factor=1
    #split_width_multiplier=1
    #no_gaps_when_only=1

}

master {
    #special_scale_factor=1.0
    #new_is_master=true
    #new_on_top=true
    #no_gaps_when_only=true
}

gestures {
#    workspaces_swipe=1
#    workspaces_swipe_fingers=3
#    workspaces_swipe_distance=2
#    workspaces_swipe_invert=1
}

# example window rules
#windowrule=move 69 420,abc
windowrule=float,mpv
windowrule=float,feh
windowrule=workspace 7,mpv
windowrule=workspace 2,Google-chrome
windowrule=workspace 9,discord
#windowrule=size 420 69,abc
windowrule=nofocus,Wofi
windowrule=float,Rofi
windowrule=float,footclient
#windowrule=pseudo,abc
#windowrule=monitor 0,xyz

# example binds
bind=SUPER,Return,exec,alacritty
bind=SUPER,q,killactive,
bind=ALT+SHIFT,Q,exit,
bind=SUPER,E,exec,dolphin
bind=SUPER,w,exec,google-chrome-stable
bind=SUPER,space,togglefloating,
bind=SUPER,f,fullscreen
bind=ALT,f,fullscreen,1
bind=SUPER,s,pseudo
bind=SUPER,D,exec,wofi --show drun,run
bind=SUPER,P,pseudo,
#bind=SUPER,C,togglegroup
bind=ALT,b,exec,~/.local/bin/music toggle
bind=ALT,bracketleft,exec,~/.local/bin/music_seek -15
bind=ALT,bracketright,exec,~/.local/bin/music_seek +15
bind=ALT,x,exec,~/.local/bin/waywall lock
bind=ALT,w,exec,~/.local/bin/waywall wall


bind=SUPER,h,movefocus,l
bind=SUPER,l,movefocus,r
bind=SUPER,k,movefocus,u
bind=SUPER,j,movefocus,d
bind=SUPER,semicolon,exec,hyprspaces
bind=SUPER,apostrophe,workspace,e-1


bind=SUPER,1,workspace,1
bind=SUPER,2,workspace,2
bind=SUPER,3,workspace,3
bind=SUPER,4,workspace,4
bind=SUPER,5,workspace,5
bind=SUPER,6,workspace,6
bind=SUPER,7,workspace,7
bind=SUPER,8,workspace,8
bind=SUPER,9,workspace,9
bind=SUPER,0,workspace,10

bind=ALT,1,movetoworkspace,1
bind=ALT,2,movetoworkspace,2
bind=ALT,3,movetoworkspace,3
bind=ALT,4,movetoworkspace,4
bind=ALT,5,movetoworkspace,5
bind=ALT,6,movetoworkspace,6
bind=ALT,7,movetoworkspace,7
bind=ALT,8,movetoworkspace,8
bind=ALT,9,movetoworkspace,9
bind=ALT,0,movetoworkspace,10

# Resize

bind=ALT,h,resizeactive,-20 0
bind=ALT,l,resizeactive,20 0
bind=ALT,j,resizeactive,0 20
bind=ALT,k,resizeactive,0 -20

# Move windows
bind=ALT+SHIFT,h,movewindow,l
bind=ALT+SHIFT,l,movewindow,r
bind=ALT+SHIFT,k,movewindow,u
bind=ALT+SHIFT,j,movewindow,d

bind=SUPER,mouse_down,workspace,e+1
#bind=SUPER,semicolon,workspace,e+1
bind=SUPER,mouse_up,workspace,e-1
#bind=SUPER,semicolon,workspace,e-1

# Special Keys

bindl=,XF86AudioRaiseVolume,exec,pamixer --allow-boost -i 10
bindl=,XF86AudioLowerVolume,exec,pamixer --allow-boost -d 10
bindl=,XF86AudioMute,exec,pamixer --toggle-mute
bindl=,XF86MonBrightnessUp,exec,light -A 10
bindl=,XF86MonBrightnessDown,exec,light -U 10
bindl=,Print,exec,~/.local/bin/wayscrot
